<?php /* Smarty version Smarty-3.1.8, created on 2014-06-02 17:22:14
         compiled from "C:\wamp\www\Auditorias\views\programa\index.tpl" */ ?>
<?php /*%%SmartyHeaderCode:170835377c30a942bd6-44774000%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '85f5822830ee07e29b8b00d2bb2a87fd24476c00' => 
    array (
      0 => 'C:\\wamp\\www\\Auditorias\\views\\programa\\index.tpl',
      1 => 1401729734,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '170835377c30a942bd6-44774000',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.8',
  'unifunc' => 'content_5377c30b328606_48281366',
  'variables' => 
  array (
    'procesos' => 0,
    '_layoutParams' => 0,
    'proceso' => 0,
    'lista' => 0,
    'datos' => 0,
    'areas' => 0,
    'rep' => 0,
    'data' => 0,
    'rep2' => 0,
    'paginacion' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5377c30b328606_48281366')) {function content_5377c30b328606_48281366($_smarty_tpl) {?><h2>Lista de auditorias</h2>
<p>
<?php if (Session::accessViewStrict(array('Lider'))){?>
    <?php  $_smarty_tpl->tpl_vars['proceso'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['proceso']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['procesos']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['proceso']->key => $_smarty_tpl->tpl_vars['proceso']->value){
$_smarty_tpl->tpl_vars['proceso']->_loop = true;
?>
    <a class="agregar" href="<?php echo $_smarty_tpl->tpl_vars['_layoutParams']->value['root'];?>
programa/nuevo/<?php echo $_smarty_tpl->tpl_vars['proceso']->value['id_proceso'];?>
">Agregar <?php echo $_smarty_tpl->tpl_vars['proceso']->value['proc_nom'];?>
</a>    
    <?php } ?>
<?php }?>
</p>
<?php if (isset($_smarty_tpl->tpl_vars['lista']->value)&&count($_smarty_tpl->tpl_vars['lista']->value)){?>
<table>
    <tr class="headtr">
        <th rowspan="2">Tipo auditoria</th>
        <?php if (Session::accessViewStrict(array('Lider'))){?>
            <th rowspan="2">Auditor</th>
        <?php }?>
        <th rowspan="2">Auditar a:</th>
        <th colspan="2">Fecha Auditorias</th>
        <th rowspan="2">Fecha reprogramada</th>
        <th rowspan="2">Reprogramar</th>
        <th rowspan="2"></th>
    </tr>
    <tr class="headtr">
        <th>Fecha Programada</th>
        <th>Fecha Compromiso</th>
    </tr>
    <?php  $_smarty_tpl->tpl_vars['datos'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['datos']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['lista']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['datos']->key => $_smarty_tpl->tpl_vars['datos']->value){
$_smarty_tpl->tpl_vars['datos']->_loop = true;
?>
    <tr>
        <td><?php echo $_smarty_tpl->tpl_vars['datos']->value['proc_nom'];?>
</td>
        <?php if (Session::accessViewStrict(array('Lider'))){?>
            <td><?php echo $_smarty_tpl->tpl_vars['datos']->value['nombre'];?>
 <?php echo $_smarty_tpl->tpl_vars['datos']->value['apellidos'];?>
</td>
        <?php }?>
        <td><?php echo $_smarty_tpl->tpl_vars['areas']->value[$_smarty_tpl->tpl_vars['datos']->value['auditoria']][$_smarty_tpl->tpl_vars['datos']->value['auditar']];?>
</td>
        <td class="cen"><?php echo date('d-m-Y',strtotime($_smarty_tpl->tpl_vars['datos']->value['fecha_programacion']));?>
</td>
        <td class="cen"><?php echo date('d-m-Y',strtotime($_smarty_tpl->tpl_vars['datos']->value['fecha_compromiso']));?>
</td>
        <?php if (Session::accessViewStrict(array('Lider'))){?>
        <?php if (isset($_smarty_tpl->tpl_vars['rep']->value[$_smarty_tpl->tpl_vars['datos']->value['id']])){?>
            <?php $_smarty_tpl->tpl_vars['data'] = new Smarty_variable($_smarty_tpl->tpl_vars['rep']->value[$_smarty_tpl->tpl_vars['datos']->value['id']], null, 0);?>
            <td>
            <?php  $_smarty_tpl->tpl_vars['rep2'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['rep2']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['data']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['rep2']->key => $_smarty_tpl->tpl_vars['rep2']->value){
$_smarty_tpl->tpl_vars['rep2']->_loop = true;
?>
                <?php echo $_smarty_tpl->tpl_vars['rep2']->value['fecha'];?>
 - <?php echo $_smarty_tpl->tpl_vars['rep2']->value['comentarios'];?>
 <br />
            <?php } ?>
            </td>
        <?php }else{ ?>
            <td></td> 
        <?php }?>
        
        <?php }?>
        <td><form action="" method="post">
            <input type="hidden" name="guardar" value="1" />
            <input type="hidden" name="proj_id" value="<?php echo $_smarty_tpl->tpl_vars['datos']->value['id'];?>
" />
            Fecha: <input required="" type="date" name="fecha"/><br />
            Motivo:<br /><textarea required="" name="comentarios" cols="50"></textarea>
            <input type="submit" value="Reporgramar"/>
        </td></form></td>
        <td>
            <?php if ($_smarty_tpl->tpl_vars['datos']->value['status']==3){?>
                <a class="editar" href="<?php echo $_smarty_tpl->tpl_vars['_layoutParams']->value['root'];?>
programa/auditar/<?php echo $_smarty_tpl->tpl_vars['datos']->value['id'];?>
/<?php echo $_smarty_tpl->tpl_vars['datos']->value['auditoria'];?>
">Realizar auditoria</a><br />
            <?php }?>
            <?php if (Session::accessViewStrict(array('Lider'))||$_smarty_tpl->tpl_vars['datos']->value['status']!=3){?>
                <a class="editar" href="<?php echo $_smarty_tpl->tpl_vars['_layoutParams']->value['root'];?>
programa/editar/<?php echo $_smarty_tpl->tpl_vars['datos']->value['id'];?>
">Editar</a>
            <?php }?>
        </td>
        
    </tr>
    
    <?php } ?>
</table>

<?php }else{ ?>

<p><strong>No se ha agendado auditorias!</strong></p>

<?php }?>

<?php if (isset($_smarty_tpl->tpl_vars['paginacion']->value)){?><?php echo $_smarty_tpl->tpl_vars['paginacion']->value;?>
<?php }?><?php }} ?>